home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / flames.zip / FLAME.QC < prev    next >
Text File  |  1996-09-24  |  3KB  |  125 lines

  1. void() Flame_Ignite;
  2. void() flame_extinguish;
  3.  
  4. void() StartFlame =
  5. {
  6.         Flame_Ignite();
  7.         remove(self);
  8. };
  9.      
  10. void() flame_spread =
  11. {
  12.         
  13. //        dprint("flame_spread ..\n");
  14.         local float rand;
  15.  
  16.         if (pointcontents(self.origin) == CONTENT_WATER)
  17.                 flame_extinguish();
  18.         rand = random();
  19.         if (rand < 0.5)
  20.         {
  21.                 self.think = flame_extinguish;
  22.                 self.nextthink = time + 5;
  23.                 Flame_Ignite();
  24.         }
  25.         else
  26.         {
  27.                 self.think = flame_extinguish;
  28.                 self.nextthink = time + 0.5;
  29.         }
  30.         
  31. };
  32.  
  33. void() flame_extinguish =
  34. {
  35. //        dprint("flame_extinguish ..\n");
  36.                 remove(self);
  37. };
  38.  
  39. void() flame_touch =
  40. {
  41.         self.solid = SOLID_TRIGGER;
  42.         if (other.takedamage)
  43.         {
  44.                 T_Damage (other, self, self, 5);
  45.                 if (other.classname == "player")
  46.                 {
  47.                         sprint(other, "Ouch Ouch Ouch Ouch Ouch!\n");
  48.                 }
  49.         }
  50. };
  51.                            
  52. void() Flame_Ignite =
  53. {
  54.         local entity flame;
  55.  
  56.         flame = spawn();
  57.         flame.owner = self.owner;
  58.         flame.movetype = MOVETYPE_TOSS;
  59.         flame.solid = SOLID_TRIGGER;
  60.         flame.classname = "flame";
  61.         flame.effects = EF_DIMLIGHT;
  62.  
  63.         flame.touch = flame_touch;
  64.  
  65.         flame.nextthink = time + 2.5;
  66.         flame.think = flame_spread;
  67.  
  68.         setmodel (flame, "progs/flame2.mdl");
  69.         setsize (flame, '0 0 0', '25 25 50');
  70.  
  71. //        setorigin (flame, self.origin );
  72.  
  73.         flame.origin_x = (self.origin_x + (random() * 50) - 25);
  74.         flame.origin_y = (self.origin_y + (random() * 50) - 25);
  75.         flame.origin_z = self.origin_z;
  76.  
  77.  
  78.         flame.velocity_x = ((random() * 20) - 40);
  79.         flame.velocity_y = ((random() * 20) - 40);
  80.         flame.velocity_z = 300;
  81.  
  82.  
  83.  
  84. //        dprint ("Flame_Ignite @ ");
  85. //        dprint (vtos(flame.origin));
  86. //        dprint ("\n");
  87.  
  88.  
  89. };
  90.  
  91. void() PlugMe =
  92. {
  93.  
  94.         dprint("=====================================\n");
  95.         dprint("= This server is running...         =\n");
  96.         dprint("=       FLAMES for Quake 1.01       =\n");
  97.         dprint("=   by Dr_Tyrell of Necessary Evil  =\n");
  98.         dprint("=      (c)opyright T Rowley 1996    =\n");
  99.         dprint("=    This is version RELEASE 1.0    =\n");
  100.         dprint("=  lemme know with comments, ideas  =\n");
  101.         dprint("=              and bugs             =\n");
  102.         dprint("=     tristan@justche.demon.co.uk   =\n");
  103.         dprint("=====================================\n");
  104.  
  105. };
  106.  
  107. void() PlugSelf =
  108. {
  109.  
  110.         sprint(self, "=====================================\n");
  111.         sprint(self, "= This server is running...         =\n");
  112.         sprint(self, "=       FLAMES for Quake 1.01       =\n");
  113.         sprint(self, "=   by Dr_Tyrell of Necessary Evil  =\n");
  114.         sprint(self, "=      (c)opyright T Rowley 1996    =\n");
  115.         sprint(self, "=    This is version RELEASE 1.0    =\n");
  116.         sprint(self, "=  lemme know with comments, ideas  =\n");
  117.         sprint(self, "=              and bugs             =\n");
  118.         sprint(self, "=     tristan@justche.demon.co.uk   =\n");
  119.         sprint(self, "=====================================\n");
  120.  
  121.         PlugFlare();
  122.  
  123. };
  124.  
  125.